package com.qf.wangqing.sportsnews.bean.newstitletype2;



import android.content.Intent;
import android.view.View;

import com.qf.wangqing.sportsnews.activity.NewsVideoActivity;

import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.List;
import java.util.Locale;

/**
 * Created by wuyang on 2016/12/21.
 */

public class TitleViewData {
    private int id;
    private int user_id;

    private int dashboard_id;

    private int dashboard_type;

    private int dashboard_data;

    private String title;

    private String text;

    private String image;

    private int image_type;

    private int content_type;

    private int status;

    private int show_type;

    private int label;

    private String create_time;

    private String editor;

    private String update_time;

    private int note_num;

    private TitleViewUser user;

    private List<TitleViewChannels> channels ;

    private List<String> text_images ;

    private String text_content;

    private String source_link;

    private int cbs_flag;

    private double js_version;

    private boolean expire_flag;

    private int collection_id;

   private String video_link;

    public String getVideo_link() {
        return video_link;
    }

    public void setVideo_link(String video_link) {
        this.video_link = video_link;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public int getUser_id() {
        return user_id;
    }

    public void setUser_id(int user_id) {
        this.user_id = user_id;
    }

    public int getDashboard_id() {
        return dashboard_id;
    }

    public void setDashboard_id(int dashboard_id) {
        this.dashboard_id = dashboard_id;
    }

    public int getDashboard_type() {
        return dashboard_type;
    }

    public void setDashboard_type(int dashboard_type) {
        this.dashboard_type = dashboard_type;
    }

    public int getDashboard_data() {
        return dashboard_data;
    }

    public void setDashboard_data(int dashboard_data) {
        this.dashboard_data = dashboard_data;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getText() {
        return text;
    }

    public void setText(String text) {
        this.text = text;
    }

    public String getImage() {
        return image;
    }

    public void setImage(String image) {
        this.image = image;
    }

    public int getImage_type() {
        return image_type;
    }

    public void setImage_type(int image_type) {
        this.image_type = image_type;
    }

    public int getContent_type() {
        return content_type;
    }

    public void setContent_type(int content_type) {
        this.content_type = content_type;
    }

    public int getStatus() {
        return status;
    }

    public void setStatus(int status) {
        this.status = status;
    }

    public int getShow_type() {
        return show_type;
    }

    public void setShow_type(int show_type) {
        this.show_type = show_type;
    }

    public int getLabel() {
        return label;
    }

    public void setLabel(int label) {
        this.label = label;
    }

    public String getCreate_time() {
        return create_time;
    }

    public void setCreate_time(String create_time) {
        this.create_time = create_time;
    }

    public String getEditor() {
        return editor;
    }

    public void setEditor(String editor) {
        this.editor = editor;
    }

    public String getUpdate_time() {
        return update_time;
    }

    public void setUpdate_time(String update_time) {
        this.update_time = update_time;
    }

    public int getNote_num() {
        return note_num;
    }

    public void setNote_num(int note_num) {
        this.note_num = note_num;
    }

    public TitleViewUser getUser() {
        return user;
    }

    public void setUser(TitleViewUser user) {
        this.user = user;
    }

    public List<TitleViewChannels> getChannels() {
        return channels;
    }

    public void setChannels(List<TitleViewChannels> channels) {
        this.channels = channels;
    }

    public List<String> getText_images() {
        return text_images;
    }

    public void setText_images(List<String> text_images) {
        this.text_images = text_images;
    }

    public String getText_content() {
        return text_content;
    }

    public void setText_content(String text_content) {
        this.text_content = text_content;
    }

    public String getSource_link() {
        return source_link;
    }

    public void setSource_link(String source_link) {
        this.source_link = source_link;
    }

    public int getCbs_flag() {
        return cbs_flag;
    }

    public void setCbs_flag(int cbs_flag) {
        this.cbs_flag = cbs_flag;
    }

    public double getJs_version() {
        return js_version;
    }

    public void setJs_version(double js_version) {
        this.js_version = js_version;
    }

    public boolean isExpire_flag() {
        return expire_flag;
    }

    public void setExpire_flag(boolean expire_flag) {
        this.expire_flag = expire_flag;
    }

    public int getCollection_id() {
        return collection_id;
    }

    public void setCollection_id(int collection_id) {
        this.collection_id = collection_id;
    }

    public String getFullStart_time(){
        String str=create_time.substring(11,16);
        return str;
    }
    public String getFullImageUrl(){
        return "http://lifeixphoto.qiniudn.com/"+image;
    }

    public void clickItem(View view){
        if (video_link != "") {
            Intent intent = new Intent(view.getContext(), NewsVideoActivity.class);
            intent.putExtra("video_link",video_link);
            view.getContext().startActivity(intent);
        }
    }

}
